# -*- coding: utf-8 -*-
# @Time    : 2022/7/16 20:36
# @Author  : haichuan
# @Email   : 2263126410@163.com
# @File    : xtbs_xg_grzlpage.py
# @Software: PyCharm
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from selenium.webdriver.support.select import Select
from pages.denglu_page import Deng_BasePage


class XgGrTx(Deng_BasePage):
    '''修改个人头像资料(定位器）'''
    driver=webdriver.Chrome
    url = "http://192.168.12.1/crm/"

    grzl = (By.CSS_SELECTOR, 'li.dropdown:nth-child(6) > ul:nth-child(2) > li:nth-child(3) > a:nth-child(1)')
    count_png = (By.ID, 'file_upload')
    save = (By.CSS_SELECTOR, '.table > tfoot:nth-child(2) > tr:nth-child(1) > td:nth-child(2) > input:nth-child(1)')

    def jr_grzl(self):
        '''点击个人资料'''
        self.driver.find_element(*self.grzl).click()
    def user_log(self,jpg):
        "上传头像"
        self.driver.find_element(*self.count_png).send_keys(jpg)

    def baocun(self):
        '''保存按钮'''
        self.driver.find_element(*self.save).click()

